﻿// JScript 文件


function Attach(dizhi,bz) //附件 
{ 
var v_cusWidth = "100%";
var attach= window.document.getElementById(dizhi); 
        if (pright == "edit" && status == "1") {
            strHtml = "<IFRAME id='CusFrameAttach' width='100%' SRC='/attachments/FileDemo.aspx?Guid="+pguid
            +"&ProcessName="+escape(proName)+"&bz="+bz+"&Mode=edit&FileSize="+psize+"&Stepname="+escape(pStepName)+"&incident="+proInc
            +"&Ultcode="+escape(pUserCode)+"&ATTRATNMME="+escape("FrameAttach")+"&ran="+Math.random()
            +"&cusWidth="+v_cusWidth
            +"' marginwidth='0' marginheight='0' scrolling='no' frameborder='0' allowtransparency='true' onload='this.height=this.contentWindow.document.body.scrollHeight'></IFRAME>";  
        }
        else {
		    strHtml = "<IFRAME id='CusFrameAttach' width='100%' SRC='/attachments/FileDemo.aspx?Guid="+pguid
		    +"&ProcessName="+escape(proName)+"&bz="+bz+"&Mode=read&FileSize="+psize+"&Stepname="+escape(pStepName)
		    +"&Ultcode="+escape(pUserCode)+"&ATTRATNMME="+escape("FrameAttach")+"&ran="+Math.random()
            +"&cusWidth="+v_cusWidth
		    +"' marginwidth='0' marginheight='0' scrolling='no'  allowtransparency='true' onload='this.height=this.contentWindow.document.body.scrollHeight'></IFRAME>"; 
        }
    attach.innerHTML = strHtml;
}
